<?xml version="1.0" encoding="UTF-8"?>
<!--
  Created by IntelliJ IDEA.
  User: Nikita
  Date: 03.02.13
  Time: 22:59
-->
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsf/core">

<h:head>
    <title>Example page</title>
    <h:outputStylesheet library="css" name="examples.css"/>
    <c:loadBundle var="msgs" basename="myevents.messages"/>
</h:head>

<h:body>
    <f:decorate template="templates/master_page_default.xhtml">
        <h2>Navigation</h2>
        <h:form prependId="false">
            <div class="line"><h:inputText size="20" value="#{nav.outcome}"/></div>
            <table class="example">
                <tr>
                    <td>Simple navigation</td>
                    <td><h:commandButton value="#{msgs.btnlabel}" action="#{nav.next}"/></td>
                </tr>
                <tr>
                    <td>Navigation with faces-config</td>
                    <td><h:commandButton value="#{msgs.anotherbtnlabel}" action="another"/></td>
                </tr>
                <tr>
                    <td>Navigation with redirection</td>
                    <td><h:commandButton value="Redirection" action="redirect"/></td>
                </tr>
                <tr>
                    <td>REST navigation</td>
                    <td>
                        <h:link value="Rest with 'item=10'" outcome="links_target_page">
                            <c:param name="item" value="10"/>
                        </h:link>
                        <br/>
                        <h:link value="Rest with 'item=10'" outcome="links_target_page?item=10"/>
                        <br/>
                        <h:button value="Rest with 'item=10'" outcome="links_target_page">
                            <c:param name="item" value="10"/>
                        </h:button>
                        <br/>
                        <h:commandLink value="Rest with commandLink" action="redir_with_params"/>
                        <h:commandLink value="Rest with inline redirection" action="links_target_page?faces-redirect=true"/>
                    </td>
                </tr>
            </table>
        </h:form>
    </f:decorate>
</h:body>

</html>